EmulationDomain

class EmulationDomain : Domain

This domain emulates different environments for the page.

Functions

canEmulate
Link copied to clipboard
fun canEmulate(): Single<CanEmulateResponse>
Tells whether emulation is supported.
clearDeviceMetricsOverride
Link copied to clipboard
fun clearDeviceMetricsOverride(): Single<RequestResponseFrame>
Clears the overriden device metrics.
clearGeolocationOverride
Link copied to clipboard
fun clearGeolocationOverride(): Single<RequestResponseFrame>
Clears the overriden Geolocation Position and Error.
clearIdleOverride
Link copied to clipboard
fun clearIdleOverride(): Single<RequestResponseFrame>
Clears Idle state overrides.
description
Link copied to clipboard
fun description(): String
Returns domain description.
events
Link copied to clipboard
fun events(): Flowable<Event>
Returns flowable capturing all domains events.
fun events(filter: Predicate<Event>): Flowable<Event>
Returns flowable capturing all domains events matching predicate.
fun <T : Event> events(eventClass: Class<T>): Flowable<T>
Returns flowable capturing all domain events of a given type.
fun <T : Event> events(eventClass: Class<T>, filter: Predicate<T>): Flowable<T>
Returns flowable capturing all domain events of a given type matching predicate.
getDependencies
Link copied to clipboard
open override fun getDependencies(): List<Domain>
Returns list of dependant domains that should be enabled prior to enabling this domain.
name
Link copied to clipboard
fun name(): String
Returns domain name.
resetPageScaleFactor
Link copied to clipboard
fun resetPageScaleFactor(): Single<RequestResponseFrame>
Requests that page scale factor is reset to initial values.
setCPUThrottlingRate
Link copied to clipboard
fun setCPUThrottlingRate(input: SetCPUThrottlingRateRequest): Single<RequestResponseFrame>
Enables CPU throttling to emulate slow CPUs.
setDefaultBackgroundColorOverride
Link copied to clipboard
Sets or clears an override of the default background color of the frame.
setDeviceMetricsOverride
Link copied to clipboard
fun setDeviceMetricsOverride(input: SetDeviceMetricsOverrideRequest): Single<RequestResponseFrame>
Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media query results).
setDisabledImageTypes
Link copied to clipboard
fun setDisabledImageTypes(input: SetDisabledImageTypesRequest): Single<RequestResponseFrame>
setDocumentCookieDisabled
Link copied to clipboard
setEmitTouchEventsForMouse
Link copied to clipboard
setEmulatedMedia
Link copied to clipboard
fun setEmulatedMedia(input: SetEmulatedMediaRequest): Single<RequestResponseFrame>
Emulates the given media type or media feature for CSS media queries.
setEmulatedVisionDeficiency
Link copied to clipboard
Emulates the given vision deficiency.
setFocusEmulationEnabled
Link copied to clipboard
fun setFocusEmulationEnabled(input: SetFocusEmulationEnabledRequest): Single<RequestResponseFrame>
Enables or disables simulating a focused and active page.
setGeolocationOverride
Link copied to clipboard
fun setGeolocationOverride(input: SetGeolocationOverrideRequest): Single<RequestResponseFrame>
Overrides the Geolocation Position or Error.
setIdleOverride
Link copied to clipboard
fun setIdleOverride(input: SetIdleOverrideRequest): Single<RequestResponseFrame>
Overrides the Idle state.
setLocaleOverride
Link copied to clipboard
fun setLocaleOverride(input: SetLocaleOverrideRequest): Single<RequestResponseFrame>
Overrides default host system locale with the specified one.
setNavigatorOverrides
Link copied to clipboard
fun setNavigatorOverrides(input: SetNavigatorOverridesRequest): Single<RequestResponseFrame>
Overrides value returned by the javascript navigator object.
setPageScaleFactor
Link copied to clipboard
fun setPageScaleFactor(input: SetPageScaleFactorRequest): Single<RequestResponseFrame>
Sets a specified page scale factor.
setScriptExecutionDisabled
Link copied to clipboard
Switches script execution in the page.
setScrollbarsHidden
Link copied to clipboard
fun setScrollbarsHidden(input: SetScrollbarsHiddenRequest): Single<RequestResponseFrame>
setTimezoneOverride
Link copied to clipboard
fun setTimezoneOverride(input: SetTimezoneOverrideRequest): Single<RequestResponseFrame>
Overrides default host system timezone with the specified one.
setTouchEmulationEnabled
Link copied to clipboard
fun setTouchEmulationEnabled(input: SetTouchEmulationEnabledRequest): Single<RequestResponseFrame>
Enables touch on platforms which do not support them.
setUserAgentOverride
Link copied to clipboard
fun setUserAgentOverride(input: SetUserAgentOverrideRequest): Single<RequestResponseFrame>
Allows overriding user agent with the given string.
setVirtualTimePolicy
Link copied to clipboard
fun setVirtualTimePolicy(input: SetVirtualTimePolicyRequest): Single<SetVirtualTimePolicyResponse>
Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets the current virtual time policy.
setVisibleSize
Link copied to clipboard
fun setVisibleSize(input: SetVisibleSizeRequest): Single<RequestResponseFrame>
Resizes the frame/viewport of the page.
virtualTimeBudgetExpired
Link copied to clipboard
fun virtualTimeBudgetExpired(): Flowable<RawEvent>
Notification sent after the virtual time budget for the current VirtualTimePolicy has run out.

Sources

jvm source
Link copied to clipboard